<?php
$settings = array(
    'name' => 'Website bán hàng',
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.extensions.solr.*'
    ),
    'components' => array(
//su dung cho multi site        
//        'session' => array(
//            'class' => 'CDbHttpSession',
//            'cookieParams' => array('domain' => '.banhang.local'),
//        ),
        'errorHandler' => array(
            'errorAction' => 'about/error',
        ),
        'db' => array(
            'class' => 'system.db.CDbConnection',
            'connectionString' => 'mysql:host=localhost;dbname=storeanhmantk',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
            'tablePrefix' => 'tbl_',
            'enableProfiling' => true,
            'enableParamLogging' => true,
            'schemaCachingDuration' => 86400
        ),        
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive' => false,
        ),        
        'cache' => array(
            'class' => 'system.caching.CFileCache',
        )
    ),
    'behaviors' => array('class' => 'application.components.WebApplicationEndBehavior'),
    'params' => require(dirname(__FILE__) . '/params.php'),
    'preload' => array('log')
);

if (YII_DEBUG == TRUE) {
    $settings['components']['log'] = array(
        'class' => 'CLogRouter',
        'routes' => array(
            array(
                'class' => 'CFileLogRoute',
                'levels' => 'error, warning',
            ),
            array(
                'class' => 'ext.yii-debug-toolbar.YiiDebugToolbarRoute',
                'ipFilters' => array('*'),
            )
        )
    );
}

return $settings;